Merged
Conversation
b8c928a to
44c4df4
Compare
9b2fddb to
11161e1
Compare
enigbe
approved these changes
Jan 30, 2025
Contributor
enigbe
left a comment
There was a problem hiding this comment.
Thanks for adding this.
I have reviewed and tested. This LGTM.
We slightly improve readability of `setup_logger`, and also clean up some of the `DEFAULT` consts while we're at it.
.. tabs, not spaces. This one seemed to have slipped by `cargo fmt`
Now that we made the `logger` module `pub`, we can drop the type exports at crate level
11161e1 to
b968ea7
Compare
arik-so
approved these changes
Jan 30, 2025
| let log_file_path = log_file_path | ||
| .clone() | ||
| .unwrap_or_else(|| format!("{}/{}", config.storage_dir_path, DEFAULT_LOG_FILENAME)); | ||
| let log_level = log_level.unwrap_or_else(|| DEFAULT_LOG_LEVEL); |
There was a problem hiding this comment.
I wonder how much we gain from using an or_else closure for a constant instead of or here.
There was a problem hiding this comment.
I wonder how cargo fmt didn't catch that?
Collaborator
Author
There was a problem hiding this comment.
It doesn’t touch macros.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #407 until that is merged.
We add some minor cleanups here.
(cc @enigbe)